package com.xdcplus.web.common.enums.trace;

import lombok.Getter;

@Getter
public enum SettlementSettingEnum {
    // 数据操作错误定义
    NUMBER_RANGE("NUMBER_RANGE", "数量范围"),
    DATE_RANGE("DATE_RANGE", "时间范围"),
    PIECE_RANGE("PIECE_RANGE", "片源厂商"),
    STICK_RANGE("STICK_RANGE", "棒源厂家"),
    BATCH_RANGE("BATCH_RANGE", "检验批次"),
    ;

    private String code;

    private String msg;

    public static String getMsg(String code) {
        for (SettlementSettingEnum ele : values()) {
            if (ele.getCode().equals(code)) {
                return ele.getMsg();
            }
        }
        return null;
    }

    SettlementSettingEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
